perm filename ERRAT2.TEX[TEX,ALS] blob sn#616945 filedate 1981-10-16 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\input dochd4  
C00019 00003	\setcount8 36
C00026 ENDMK
C⊗;
\input dochd4  
%\input webhdr.tex[pas,dek]
%\input dochdr

\def\dispentry#1#2{{}
	\spaceskip 3.333pt plus 10pt minus 2pt
	\xspaceskip 4.444pt plus 11pt minus 3pt
	\parindent 0pt
	$$\hbox par 11cm{\hangindent 3cm after 1\hbox to 3cm{#1\hfil\quad}#2}
	$$
	\parindent 20pt
	}
\def\dispar#1\par{{}
	\spaceskip 3.333pt plus 10pt minus 2pt
	\xspaceskip 4.444pt plus 11pt minus 3pt
	\parindent 0pt
	$$\hbox par 10cm{#1}
	$$
	\parindent 20pt
	}
\def\hide#1{\hbox to 0pt{\hss#1}}
\def\α{\hide{-}\ }
\def\β{\hide{$\bullet$}\ }
\def\runningrighthead#1{\gdef\chead{\:m#1}} %\runningrighthead sets chead
 
\advcount0
\secbegin \head{PASCAL-coded \TEX\ ERRATA}\runninglefthead{PASCAL-CODED \TEX\ ERRATA}

\par\vfill\eject

\setcount0 1
\ctrline{\:q PASCAL-CODED \TEX\ ERRATA}
\ctrline{Arthur L. Samuel}
\ctrline{Stanford University}

The rate at which errors are being reported for the ``PASCAL-coded version
of \TEX'' has slowed down to the point that we seem to be approaching that
famous last bug.  All known errors have been corrected in the DOC and
PASCAL files available from Stanford and an August 1981 revision of the
descriptive documents has been printed.  There are a few instances where
suggested changes (for example, as in the naming of variables) have not
yet been made.

One correction, made since August, is reported below.  Also reported is a
suggested improvement to \&{procedure} $\\{PrintOctal}$.

\setcount8 452
\secbegin An error has been found and fixed in the main operating module of
the PASCAL-coded version of \TEX. as described in section 453 on page 157
of the August 1981 revision.  This error affected the use of $\\{leqno}$.
The correction involves replacing the word $\\{linq}$ with $\\{link}$ and
adding a missing line of \ $\\{shift}\mathrel:=0.0$; as shown below:

\setcount8 452
\secbegin \6Attach equation number{ \:m453\7} \.=\par
\pascal
\1\3\2\&{begin} \0$\\{q}\mathrel:=\\{getnode}(\\{gluenodesize})$;
\0$\\{typ}(\\{q})\mathrel:=\\{gluenode}$;
\0$\\{gluelink}(\\{q})\mathrel:=\\{fillglue}$;
\2\1\&{if} $\\{leqno}$ \&{then}
\2\&{begin} \0$\\{link}(\\{q})\mathrel:=\\{b}$;
\0$\\{link}(\\{eqnobox})\mathrel:=\\{q}$;
\0$\\{b}\mathrel:=\\{hpack}(\\{eqnobox},\45\\{dw}-\\{shift},\45\\{false})
$;\40\
$\{\;$\\{eqno} will be left justified$\;\}$
\2$\\{shift}\mathrel:=0.0$;
\2\&{end}\3
\2\&{else} \1\&{begin} \0$\\{link}(\\{q})\mathrel:=\\{eqnobox}$;
\0$\\{link}(\\{b})\mathrel:=\\{q}$;
\0$\\{b}\mathrel:=\\{hpack}(\\{b},\45\\{dw}-\\{shift},\45\\{false})
\null$\40\ $\{\;$\\{eqno} will be right-justified$\;\}$
$\null
$
\2\&{end}\3
\2\&{end}


\note This code is used in section 444.

\par
\setcount8 36
\secbegin The following procedure should work on both 36-bit and 32-bit
machines and specifically on those machines where the previous PrintOctal
procedure caused overflow problems. This may be used to replace procedure
PrintOctal; in section 37 on page 18 of the SYSDEP module.
\pascal
\1\3\2\1\1\&{procedure} $\\{PrintOctal}(\\{n}\mathrel:\\{integer})$;\40\ $\{\;$Prints the rightmost 32 bits
					of an integer in octal$\;\}$
\3\2\1\&{var} $\\{i},\45\\{k}\mathrel:\\{integer}$;
\2$\\{s}\mathrel:\mathop{\&{array }}[0\mathrel{\!.\,.\!}10]\mathop{\&{\ of }\!}
\\{asciiCode}$;
\2$\\{msb},\45\\{mbb}\mathrel:\\{boolean}$;
\3\2\&{begin} \0$\\{msb}\mathrel:=\\{false}$;
\0$\\{mbb}\mathrel:=\\{false}$;
\2\1\&{if} $\\{n}<0$ \&{then}
\2\&{begin} \0$\\{n}\mathrel:=-\\{n}$;
\0$\\{msb}\mathrel:=\\{true}$
\2\&{end}\3
;
\2\1\&{for} $\\{k}\mathrel:=10\mathrel{\&{downto}}0$ \&{do}
\2\&{begin} \0$\\{i}\mathrel:=\\{n}\mathbin{\&{mod}}8$;
\2\1\&{if} $\\{k}=0$ \&{then}
\2\&{begin} \0\1\&{if} $\\{msb}$ \&{then}
\2\&{begin} \0\1\&{if} $\\{i}>3$ \&{then}
\0$\\{i}\mathrel:=7-\\{i}\null$\40\ $\{\;$it was a 36 bit word$\;\}$
$\null
$\3
\2\&{else} \1\&{begin} \0\1\&{if} $(\\{i}\mathbin{\&{mod}}2)=0$ \&{then}
\0$\\{i}\mathrel:=3$\3
\2\&{else} \0$\\{i}\mathrel:=2$
\2\&{end}\3
\2\&{end}\3
\2\&{else} \0$\\{i}\mathrel:=(\\{i}\mathbin{\&{mod}}4)$
\2\&{end}\3
\2\&{else} \1\&{begin} \0\1\&{if} $\\{msb}=\\{true}$ \&{then}
\2\&{begin} \0\1\&{if} $\\{mbb}=\\{true}$ \&{then}
\0$\\{i}\mathrel:=7-\\{i}\null$\40\ $\{\;$a borrow has propagated$\;\}$
$\null
$\3
\2\&{else} \1\&{begin} \0\1\&{if} $\\{i}>0$ \&{then}
\2\&{begin} \0$\\{i}\mathrel:=8-\\{i}$;
\0$\\{mbb}\mathrel:=\\{true}$;\40\
$\{\;$a borrow required$\;\}$
\2\&{end}\3
\2\&{end}\3
\2\&{end}\3
;
\2\&{end}\3
;
\2\1\&{case} $\\{i}$ \&{of}
\2\10: \0$\\{s}[\\{k}]\mathrel:=\\{zero}$\3;
\2\11: \0$\\{s}[\\{k}]\mathrel:=\\{one}$\3;
\2\12: \0$\\{s}[\\{k}]\mathrel:=\\{two}$\3;
\2\13: \0$\\{s}[\\{k}]\mathrel:=\\{three}$\3;
\2\14: \0$\\{s}[\\{k}]\mathrel:=\\{four}$\3;
\2\15: \0$\\{s}[\\{k}]\mathrel:=\\{five}$\3;
\2\16: \0$\\{s}[\\{k}]\mathrel:=\\{six}$\3;
\2\17: \0$\\{s}[\\{k}]\mathrel:=\\{seven}$\3
\2\&{end}\3;
\2$\\{n}\mathrel:=\\{n}\mathbin{\&{div}}8$;
\2\&{end}\3
;
\2$\\{Print}(\.{{\rm``}'{\rm''}})$;
\0$\\{k}\mathrel:=0$;
\2\1\&{while} $(\\{k}<10)\mathbin{\&{and}}(\\{s}[\\{k}]=\\{zero})$ \&{do}
\0$\\{Increment}(\\{k})$\3
;
\2\1\&{for} $\\{k}\mathrel:=\\{k}\mathrel{\&{to}}10$ \&{do}
\0$\\{Print}(\\{s}[\\{k}])$\3
\2\&{end};

\par\vfill\eject

\end